{layout name="p/base"}
    <div class="row">
      <div class="col-lg-12">
        <h1>营地管理 <small>营地信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="/manager/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 营地信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          这里可以添加、修改、删除营地信息 
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <form class="form-horizontal" role="form" action="/campcontrol/index" method="get">
            <div class="form-group col-sm-1" style="margin-right:10px;">
              <a href="/campcontrol/create" class="form-group btn btn-primary">增加营地</a>
            </div>
          <div class="form-group col-sm-2" style="margin-right:10px;">
            <label for="">选择营地</label>
            <select class="form-control" name="id">
            <option value="">全部</option>
            {volist name='campinfos' id='vo'}
            {if input('id')==$vo['id']}
            <option value="{$vo.id}" selected>{$vo.name}</option>
            {else}
            <option value="{$vo.id}">{$vo.name}</option>
            {/if}
            {/volist}
            </select>
          </div>
          <div class="form-group col-sm-2 input-group" style="margin-right:10px;">
            <label for="">搜索条件</label>
            <select class="form-control" name="searchfield">
            {foreach $seek as $k=>$v }
            {if input('searchfield')==$k}
              <option value="{$k}" selected>{$v}</option>
            {else}
              <option value="{$k}">{$v}</option>
            {/if}
            {/foreach}
            </select>
          </div>
          <div class="form-group col-sm-2 input-group" style="margin-right:10px;">
            <label for="">&nbsp;</label>
            <label for="">请输入搜索条件关键字</label>
            <input class="form-control" type="text" placeholder="请输入关键字" value="{:input('keyword')}" name="keyword">
            <label for="">&nbsp;</label>
            <span class="input-group-btn">
              <button class="btn btn-default" type="submit">搜索</button>
            </span>
          </div>
          <div class="clearfix"></div>
        </form>
      </div>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th>营地编号</th>
                <th>营地名称</th>
                <th>营地类型</th>
                <th>营地星级</th>
                <th>泊位数量</th>
                <th>所属分公司</th>
                <th>地址</th>
                <th>营地电话</th>
                <th>营地旅行币基数</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            {foreach $list as $v}
              <tr>
                <td>{$v.number}</td>
                <td>{$v.name}</td>
                <td>{$v->getType($v.type)}</td>
                <td>{$v->getGrade($v.grade)}</td>
                <td>{$v.count}</td>
                <td>{$v.branch_name}</td>
                <td>{$v.address}</td>
                <td>{$v.tel}</td>
                <td>{$v.travel_money_base}</td>
                {if $v.status==-99}
                <td><a href="/campcontrol/{$v.id}/editinfo">编辑</a> | <a href="/campcontrol/{$v.id}/readinfo">查看</a> | 等待总公司审核</td>
                {else/}
                <td><a href="/campcontrol/{$v.id}/editinfo">编辑</a> | <a href="/campcontrol/{$v.id}/readinfo">查看</a> | <a href="/campcontrol/{$v.id}/addcampmanager">添加营地管理员</a></td>
                {/if}
              </tr>
            {/foreach}
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <!-- /.row -->

